<script>
	$(function(){
		init_city_select($("#sel1, #sel2"));
	});
	
	function getValue() {
		alert($('#sel1').val());
	}
</script>
<div ng-include="'/modules/template/header.html'"></div>  
<div class="weizhi">
	<div class="container">
    	<div class="row">
        	<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 t_weizhi">
            	当前位置->><a href="">首页</a>->><a>编辑地址 </a>
            </div>
        </div>
    </div>
</div>
<div style="width:1170px;padding-left: 15px;padding-right: 15px;margin-left: auto;margin-right: auto;">
	<form class="form-horizontal" id="myForm" role="form" name="myForm">
		<div class="wx_add_region">
			<input ng-model="consigneeInfo.id" ng-hide="true" >
		<div class="wx_add_region_title" ><span >*</span>&nbsp;&nbsp;所在地区：</div>
		<div class="btn-group">
		<!-- <input type="text" class="wx_add_shuru" placeholder="请选择地区" id="txt_city"  readonly="readonly"> -->
		<input id="sel1"  type="text"  class="wx_add_shuru"  readonly="readonly"  placeholder="请选择地区" style="width:250px"  value="{{consigneeInfo.province}}-{{consigneeInfo.city}}">
		</div>
		</div>
		<div class="wx_add_region">
		<div class="clear"></div>
		<div class="wx_add_region_title"><span >*</span>&nbsp;&nbsp;详情地址：</div>
			<input type="text" class="wx_add_shuru" name="address" ng-maxlength="30" ng-required="true" placeholder="建议您如实填写详细地址，例如街道名称，门牌号码，楼层和房间号等信息" ng-model="consigneeInfo.connect_address">
		<div class="clear"></div>
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto" ng-show="myForm.address.$dirty && myForm.address.$error.maxlength" class="alert alert-danger help-block">
					地址不能超过30个字符 
		</div>
		<div class="wx_add_region">
		<div class="wx_add_region_title"><span>*</span>&nbsp;&nbsp;邮政编码：</div>
			<input type="text" class="wx_add_code" ng-maxlength="6"name="code" ng-pattern="/^[0-9]/" placeholder="如若不清楚，请填写‘000000’" ng-required="true" ng-model="consigneeInfo.postcode">
		<div class="clear"></div>
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto"ng-show="myForm.code.$dirty && myForm.code.$error.maxlength" class="alert alert-danger help-block">
						邮政编码不能超过6个字符 
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto" ng-show="myForm.code.$dirty && myForm.code.$error.pattern" class="alert alert-danger help-block">
					邮政编码不能是汉字 
		</div>
		
		<div class="wx_add_name">
		<div class="wx_add_region_title"><span>*</span>&nbsp;&nbsp;收货人姓名：</div>
			<input type="text" class="wx_add_code"ng-maxlength="8"  name="consigneeName" ng-required="true" placeholder="请填写真实姓名" ng-model="consigneeInfo.consignee_name">
		<div class="clear"></div>
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto" ng-show="myForm.consigneeName.$dirty && myForm.consigneeName.$error.maxlength" class="alert alert-danger help-block">
					收货人姓名不能超过8个字符 
		</div>
		
		<div class="wx_add_num">
		<div class="wx_add_region_title"><span>*</span>&nbsp;&nbsp;手机号：</div>
			<input type="text" class="wx_add_code" ng-maxlength="11" name="phone" ng-pattern="/^1[34578]\d{9}$/" ng-required="true" placeholder="请填写真实有效的手机号" ng-model="consigneeInfo.telephone">
		<div class="clear"></div>
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto"ng-show="myForm.phone.$dirty && myForm.phone.$error.maxlength" class="alert alert-danger help-block">
			手机号不能超过11个字符
		</div>
		<div  style="width:55%;text-align:center;margin:1 auto"ng-show="myForm.phone.$dirty && myForm.phone.$error.pattern" class="alert alert-danger help-block">
				请输入有效的手机号码
		</div>
	    <div class="wx_add_set"> 
	         <input type="checkbox"  id="checkbox_c" checked />
	         <label for="checkbox_c" ></label>
	         设为默认收货地址
        </div>
		<div class="clear"></div>
		<button type="button" class="wx_add_btn" ng-click="updateAddress()">保存</button>
		<button type="button" class="wx_add_btn" ng-click="back()" >返回</button>
	</form>
</div>